package Thread;

import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;

import java.util.Date;

public class Thread {
    public static void main(String[] args) {
        String dateStr1 = "2024-01-15";
        Date date1 = DateUtil.parse(dateStr1);

        String dateStr2 = "2024-01-16";
        Date date2 = DateUtil.parse(DateUtil.today());

//相差一个月，31天
        long betweenDay = DateUtil.between(date1, date2, DateUnit.DAY);
        System.out.println(betweenDay);
    }
}
